﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AdvanceLib.ScriptCore.Formatters
{
    public class WhiteSpaceFormatter : IFormatter
    {
        #region IFormatter Member
        public string Format(string input)
        {
            string output = input;

            output = output.Replace("\r", string.Empty);
            output = output.Replace("\t", string.Empty);

            while (output.Contains(" " + " "))
                output = output.Replace(" " + " ", " ");

            return output;
        }
        #endregion
    }
}
